﻿package view.prompt
{
    import com.core.*;
    import com.sh.game.util.*;
    import flash.events.*;
    import flash.utils.*;
    import manager.*;

    public class PrivateChatPrompt extends ImgPromptCell
    {
        private var _chatDic:Dictionary;

        public function PrivateChatPrompt()
        {
            this._chatDic = new Dictionary();
            return;
        }// end function

        override protected function doMouse(event:MouseEvent) : void
        {
            super.doMouse(event);
            PluginManager.instance.openPlugin("simpleChat", UIGlobel.pointsDic["social"], this._chatDic);
            this._chatDic = new Dictionary();
            return;
        }// end function

        override public function show(param1:Object) : void
        {
            var _loc_2:Array = null;
            var _loc_3:Object = null;
            var _loc_4:Array = null;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            if (param1)
            {
                _loc_2 = param1.split("#!");
                if (_loc_2[0] == UserData.getUserData("rid"))
                {
                    return;
                }
                if (_loc_2[0] > 0)
                {
                    _loc_4 = ModelProxy.getValue("data", "heilist");
                    if (_loc_4 && _loc_4.length > 0)
                    {
                        _loc_5 = 0;
                        _loc_6 = _loc_4.length;
                        _loc_5 = 0;
                        while (_loc_5 < _loc_6)
                        {
                            
                            if (_loc_2[0] == _loc_4[_loc_5])
                            {
                                return;
                            }
                            _loc_5++;
                        }
                    }
                }
                _loc_3 = {rid:_loc_2[0], name:_loc_2[1], sex:_loc_2[8], career:_loc_2[9], rein:_loc_2[10], level:_loc_2[11]};
                this._chatDic[_loc_2[0]] = _loc_3;
            }
            super.show(param1);
            if (param1 == null)
            {
                if (tweenMax != null)
                {
                    tweenMax.kill();
                    tweenMax = null;
                    this.alpha = 1;
                }
            }
            return;
        }// end function

    }
}
